#define _CRT_SECURE_NO_WARNINGS 1
#include"DList.h"

void TestDList1()
{
	DListNode* head = ListInit();
	ListPushBack(head, 1);
	ListPushBack(head, 2);
	ListPushBack(head, 3);
	ListPushBack(head, 4);
	ListPopBack(head);
	//ListPopBack(head);
	//ListPopBack(head);
	//ListPopBack(head);
	ListPrint(head);
	ListPushFront(head, 1);
	ListPushFront(head, 2);
	ListPushFront(head, 3);
	ListPushFront(head, 4);
	ListPopFront(head);
	ListPrint(head);
	DListNode* pos = ListFind(head, 1);
	ListInsert(pos, -1);
	ListErase(pos);
	ListPrint(head);

	ListDestroy(head);
}
int main()
{
	TestDList1();
	return 0;
}